const http = uni.$u.http

export const offiacc = params => http.get(`api/member.Login/offiacc`, {
	params
}, {
	custom: {
		noToken: true
	}
})

// 销售营销工具
export const marketList = params => http.get(`admin/setting.Market/list`, {
	params
})

// 用户营销工具
export const userMarketList = params => http.get(`api/content.Content/getMarketList`, {
	params
})

// APP登录
export const applogin = params => http.get(`api/member.Login/applogin`, {
	params
})

// 2.0 公众号登录
export const oauth = params => http.get(`api/member.Login/oauth`, {
	params
}, {
	custom: {
		noToken: true
	}
})

// 2.0 手机登录验证码
export const loginPhoneCaptcha = params => http.get(`api/member.Login/phoneCaptcha`, {
	params
}, {
	custom: {
		noToken: true,
	}
})

// 2.0 手机登录
export const phoneLogin = param => http.post('api/member.Login/phoneLogin', param, {
	custom: {
		loadingTitle: '登录中...'
	}
})

// ==================================

export const login = param => http.post('api/member.Login/login', param, {
	custom: {
		loadingTitle: '登录中...'
	}
})

export const settingNotice = param => http.post('api/member.Member/settingNotice', param, {
	custom: {
		loadingTitle: '设置中...'
	}
})

export const analysis = params => http.get(`api/content.Matchs/analysis`, {
	params
})

export const matchList = params => http.get(`api/content.Matchs/list`, {
	params
})

export const matchInfo = params => http.get(`api/content.Matchs/info`, {
	params
})

export const matchFocus = params => http.get(`api/content.Matchs/focus`, {
	params
}, {
	custom: {
		loading: false
	}
})

export const memberUserInfo = param => http.post('api/member.Member/info', param, {
	custom: {
		loadingTitle: '获取中...'
	}
})

export const history = params => http.get(`api/content.Matchs/history`, {
	params
}, {
	custom: {
		loading: false
	}
})